package com.dd.mapper;

import com.dd.pojo.Userorder;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserOrderMapper {
    @Insert("insert into userorder values(#{user_id},#{order_id})")
    public void save(Userorder userorder);

    @Select("select * from userorder where user_id=#{user_id}")
    List<Userorder> findByUserId(Integer user_id);

    @Select("select * from userorder where user_id=#{user_id} and order_id=#{uuid} ")
    List<Userorder> findByUserIdUUID(Integer user_id,String uuid);
}
